package oralExamSchedulingSystemTest;

import java.util.LinkedList;

import junit.framework.*;
import oralExamSchedulingSystem.Group;
import oralExamSchedulingSystem.Time;
import oralExamSchedulingSystem.Timetable;

import org.junit.Before;
import org.junit.Test;

public class TestTimetable extends TestCase {

	private Timetable timetable;
	private Group group;

	public TestTimetable(String name) 
	{
		super(name);
	}

	@Before
	public void setUp() {
		
	}

	public void tearDown() {

	}

	@Test
	public void testTimetable() {
		// assertEquals(, );
	}
	
	@Test
	public void testgetNumberOfGroup() {
		LinkedList<String> roomNum=new LinkedList<String>();
		roomNum.add("501");
		roomNum.add("502");
		roomNum.add("503");
		roomNum.add("504");
		roomNum.add("505");
		roomNum.add("506");
		roomNum.add("507");
		Timetable chineseTimeTable=new Timetable("Chinese","101","1/2",540,15,5,25,7,roomNum);
		
		assertEquals(25, chineseTimeTable.getNumberOfGroup());
	}

	@Test
	public void testgetReportingRoom() {
		LinkedList<String> roomNum=new LinkedList<String>();
		roomNum.add("501");
		roomNum.add("502");
		roomNum.add("503");
		roomNum.add("504");
		roomNum.add("505");
		roomNum.add("506");
		roomNum.add("507");
		Timetable chineseTimeTable=new Timetable("Chinese","101","1/2",540,15,5,25,7,roomNum);
		
		assertEquals("101", chineseTimeTable.getReportingRoom());
	}
	
	@Test
	public void testgetDate() {
		LinkedList<String> roomNum=new LinkedList<String>();
		roomNum.add("501");
		roomNum.add("502");
		roomNum.add("503");
		roomNum.add("504");
		roomNum.add("505");
		roomNum.add("506");
		roomNum.add("507");
		Timetable chineseTimeTable=new Timetable("Chinese","101","1/2",540,15,5,25,7,roomNum);
		
		assertEquals("1/2", chineseTimeTable.getDate());
	}
	
	@Test
	public void testgetGroupByID(int id) {
		LinkedList<String> roomNum=new LinkedList<String>();
		roomNum.add("501");
		roomNum.add("502");
		roomNum.add("503");
		roomNum.add("504");
		roomNum.add("505");
		roomNum.add("506");
		roomNum.add("507");
		Timetable chineseTimeTable=new Timetable("Chinese","101","1/2",540,15,5,25,7,roomNum);
		Group group=new Group("101",111,new Time(540,15),"Eng",5);
		assertEquals(group, chineseTimeTable.getGroupByID(group.getGroupID()));
	}
	
	
	
}
